/*********************************************************************
* File: playstate.h
* Create Game Play State
* Author: 10520418 Bui Huu Hiep
**********************************************************************/
#pragma once
#ifndef _PLAYSTATE_H
#define _PLAYSTATE_H

#include "State.h"
#include "Method.h"
#include "Info.h"

extern 	vector<GameObject*> ListObjects;		// Save Coin, MushGreen, MushRed, Star.
extern Mario* _mario;
/********************************************
* EditorState
* Inheritance form class State
* Create Play State
********************************************/
class PlayState : public State
{
private:
	Viewport*			_viewport;
	QNode*				_TreeUpdate;
	QNode*				_TreeRender;

	vector<GameObject*> _list;				// Save Dynamic Objects when Update or Render
	vector<GameObject*> _listStatic;		// Save Static Objects when Update or Render

	Info*				_info;

	int					_count_time;
public:
	PlayState(Resources* res, bool newgame);
	~PlayState(void);

	void Update(float time);
	void ProcessInput(Input* input);
	void Render(LPD3DXSPRITE spriteHandler);

	void Release();

	void LoadNextLevel();
};
#endif

